<?php
/* 
 * @package Analyser
 * @author Yves Peeters
 */
include_once('/opt/www/designexpress/web/www.designexpress.be/Classes/Output/Autokeyword.php');
class MetaAnalyser{


    /**
     * returns a list of suggested keywords for provided page
     * @param String $filepath
     * @param String $push
     * @return String
     */
    function suggested_keywords($string,$push="") {
        ob_start();
        echo $string;
        $data = ob_get_clean();
        $params['content'] = $data; //page content
        //set the length of keywords you like
        $params['min_word_length'] = 2;  //minimum length of single words
        $params['min_word_occur'] = 2;  //minimum occur of single words
        $params['min_2words_length'] = 2;
        $params['min_2words_phrase_length'] = 5;
        $params['min_2words_phrase_occur'] =2;
        $params['min_3words_length'] = 2;
        $params['min_3words_phrase_length'] = 7;
        $params['min_3words_phrase_occur'] = 2;
        $keyword = new Output_Autokeyword($params, "utf-8");
        return $keyword->parse_words();
    }
}
?>
